<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选项卡</title>
    <link rel="stylesheet" href="./css/index.css">
</head>
<body>
    <div id="app">
        <div class="tabs">
            <div class="title-wrapper">
                <div class="order-wrapper">
                    <span class="title-bar"></span>
                    <div class="title-conten">
                        <h3>排行榜</h3>
                        <a href="#">更多</a>
                    </div>
                </div>
                <div class="nav">
                    <ul>
                        <li @click='flag=index' v-for='(item,index) in list' :key='item.price'>
                            <span :class="flag==index?'select':''">{{item.title}}</span>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- 组件 -->
            <tab :goods='list[flag]'></tab>
        </div>
    </div>

    <!-- 组件 -->
    <template id="cpn">
        <div>
            <ul class="tab">
                <li v-for="(item,index) in goods.con" :key='item.price'>
                    <div class="left-info">
                        <img :src="item.img" alt="">
                        <div class="info">
                            <h3>{{item.text}}</h3>
                            <p>{{item.price}}</p>
                        </div>
                    </div>
                    <div class="right-info">
                        {{item.describe}}
                    </div>
                </li>
            </ul>
        </div>
    </template>
</body>
<script src='../js/vue.js'></script>
<script src="./js/data.js"></script>
<script src="./js/index.js"></script>
</html>